<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditAuthorTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditAuthorLabel_singerId}" for="singerId" />
                    <h:inputText id="singerId" value="#{authorController.selected.singerId}" title="#{bundle.EditAuthorTitle_singerId}" />
                    <h:outputLabel value="#{bundle.EditAuthorLabel_name}" for="name" />
                    <h:inputText id="name" value="#{authorController.selected.name}" title="#{bundle.EditAuthorTitle_name}" />
                    <h:outputLabel value="#{bundle.EditAuthorLabel_description}" for="description" />
                    <h:inputTextarea rows="4" cols="30" id="description" value="#{authorController.selected.description}" title="#{bundle.EditAuthorTitle_description}" />
                    <h:outputLabel value="#{bundle.EditAuthorLabel_userAddId}" for="userAddId" />
                    <h:inputText id="userAddId" value="#{authorController.selected.userAddId}" title="#{bundle.EditAuthorTitle_userAddId}" />
                    <h:outputLabel value="#{bundle.EditAuthorLabel_creationTime}" for="creationTime" />
                    <h:inputText id="creationTime" value="#{authorController.selected.creationTime}" title="#{bundle.EditAuthorTitle_creationTime}" />
                    <h:outputLabel value="#{bundle.EditAuthorLabel_enable}" for="enable" />
                    <h:inputText id="enable" value="#{authorController.selected.enable}" title="#{bundle.EditAuthorTitle_enable}" />
                    <h:outputLabel value="#{bundle.EditAuthorLabel_avatarImageLink}" for="avatarImageLink" />
                    <h:inputText id="avatarImageLink" value="#{authorController.selected.avatarImageLink}" title="#{bundle.EditAuthorTitle_avatarImageLink}" />
                </h:panelGrid>
                <h:commandLink action="#{authorController.update}" value="#{bundle.EditAuthorSaveLink}"/>
                <br />
                <br />
                <h:link outcome="View" value="#{bundle.EditAuthorViewLink}"/>
                <br />
                <h:commandLink action="#{authorController.prepareList}" value="#{bundle.EditAuthorShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.EditAuthorIndexLink}" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
